<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>test</title>
    <script src="__PUBLIC__/assets/js/jquery.min.js"></script>
</head>

<body>
<form name="form">
    <input type="button" id="btn" value="button"/>
</form>
<script>

    $(document).ready(function () {

        $("#btn").click(function () {
            $.ajax({
                type: 'GET',  //这里用GET
                url: '__PUBLIC__/index/jsonp',
                dataType: 'jsonp',  //类型
                data: {
                    "data1": 1
                },
                jsonp: 'callback', //jsonp回调参数，必需
                async: false,
                success: function (result) {//返回的json数据
                    console.log(result);
                },
                timeout: 3000
            })
        });

    });
</script>
</body>
</html>
